home *** CD-ROM | disk | FTP | other *** search
/ 17 Bit Software 6: Level 6 / 17 Bit - Level 6 (1998)(Epic Marketing)[!].iso / quartz / q0705.dms / q0705.adf / Amiga / Appendices / FunctionsAndLibraries / DiskfontLibrary.doc < prev    next >
Text File  |  1992-07-29  |  2KB  |  75 lines

  1. 3    DISKFONT LIBRARY
  2.  
  3. 3.1  OPEN THE DISKFONT LIBRARY
  4.  
  5. The Diskfont Library must have been opened before you may use
  6. the functions listed in this file.
  7.  
  8.  
  9.   /* Declare a pointer to the Diskfont library: */
  10.   struct Library *DiskfontBase;
  11.  
  12.   /* Open the Diskfont Library: */
  13.   DiskfontBase = (struct DiskfontBase *)
  14.     OpenLibrary( "diskfont.library", 0 );
  15.  
  16.   if( !DiskfontBase )
  17.     exit(); /* Could NOT open the Diskfont Library! */
  18.  
  19.  
  20.   /* ... */
  21.  
  22.  
  23.   /* Close the Diskfont Library: */
  24.   CloseLibrary( DiskfontBase );
  25.  
  26.  
  27.  
  28. 2.2  FUNCTIONS
  29.  
  30. AvailFonts()
  31.  
  32.   This function will scan through the font directory of the
  33.   system disk, and return a complete list of available fonts.
  34.  
  35.   Synopsis: missing = AvailFonts( buffer, size, type );
  36.  
  37.   missing:  (long) If the buffer was not big enough to store
  38.             the complete list of fonts in the extra number of
  39.             bytes needed is returned. If 0 is returned the
  40.             buffer was big enough for a complete list of fonts.
  41.  
  42.   buffer:   (char *) Pointer to some memory were the list of
  43.             fonts can be stored.
  44.           
  45.   size:     (long) The size of the buffer (in bytes).
  46.  
  47.   type:     (long) If you want to look for available fonts
  48.             which are already in the memory set the flag
  49.             "AFF_MEMORY". If you want to search the disk for
  50.             available fonts, set the flag "AFF_DISK". To
  51.             search both the memory and the disk set both flags
  52.             with the binary OR operator between:
  53.             "AFF_DISK | AFF_MEMORY".
  54.  
  55.  
  56.  
  57. OpenDiskFont()
  58.  
  59.   To load fonts from the disk and open them use the
  60.   OpenDiskFont() function. Note that you must have opened the
  61.   DiskFont Library before you may call this function. Remember
  62.   to close all fonts you have opened!
  63.   
  64.   Synopsis: font = OpenDiskFont( attr );
  65.  
  66.   font:     (struct TextFont *) Pointer to a TextFont structure
  67.             or NULL if OpenFont() could not find the font.
  68.           
  69.   attr:     (struct TextAttr *) Pointer to an initialized
  70.             TextAttr structure. OpenDiskFont() will try to open
  71.             the font which closes matches your requirements.
  72.  
  73.  
  74.  
  75.